#!/bin/bash
#Sister of share-net.sh script (all info there)
IFACE='wlan0'

if [ $UID -ne 0 ];then
	echo "Must be root to do that!"
	exit 1
fi;

echo -n "Stopping DHCP server"
/etc/init.d/dhcp3-server stop &> /dev/null || echo "Failed to stop DHCP3-server - disabling FAILED!" && exit 1
echo " .... Done"

echo -n "Stopping FireHOL"
/etc/init.d/firehol stop &> /dev/null || echo "Failed to stop FireHOL - disabling FAILED!" && exit 1
echo " .... Done"

echo -n "Disabling interface" $IFACE
ifconfig $IFACE down &> /dev/null || echo "Failed to put interface $IFACE down - disabling FAILED!" && exit 1
echo " .... Done"

echo "All done, internet sharing DISABLED"
